public with sharing class SQLUtil {
    
   public static  sObject[]  query(String sql){
   		return Database.query(sql);
   }

   public static Map<String ,Object> pagequery(String sql ){
		Map<String,Object> tmp= new Map<String,Object>();
        tmp.put('data', Database.query(sql)) ;
        tmp.put('size', Database.countQuery(sql.replaceFirst('select.*from','select count() from ').replaceFirst('order by.*',' ') ));
        return tmp;
    }
}